package com.knowledge.business.config;

import com.knowledge.business.service.MemoryChatAssistant;
import dev.langchain4j.memory.ChatMemory;
import dev.langchain4j.memory.chat.MessageWindowChatMemory;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @author: zhaoyongke
 * @create: 2025-09-09 12:58
 * @description: chatMemory
 */
@Configuration
public class MenoryChatAssistantConfig {
    @Bean
    public ChatMemory chartMemory() {
        MessageWindowChatMemory memory = MessageWindowChatMemory.withMaxMessages(10);
        return memory;
    }

}
